<template>
  <div class="consume-container">
    <el-container>
      <!-- 侧边栏 -->
      <el-aside width="200px">
        <el-menu background-color="#3a62d7" text-color="#fff" active-text-color="#409EFF" router>
          <el-menu-item v-for="item in navList" :key="item.id" :index="item.path">
            {{ item.title }}
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <el-card>
          <!-- 路由占位符 -->
          <router-view></router-view>
        </el-card>
      </el-main>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      navList: [
        { id: 1, title: '餐饮中心', path: '/canteen' },
        { id: 2, title: '恒星商城', path: '/supermarket' }
      ]
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
.consume-container {
  .el-menu {
    height: 100%;
    border-radius: 10px 0 0 10px;
    overflow: hidden;
  }
  .el-main {
    padding: 0;
  }
  display: flex;
  .navigation {
    width: 20%;
  }
  // .body-container {
  // }
}
</style>
